// type Status = number | string; //type定义的联合类型
// function changeUserStatus(data: Status): void {
//   console.log("|管道符", data);
// }
// changeUserStatus(11);
// changeUserStatus("11");

// type Gender = "man" | "woman"; //联合类型
// function changeGender(data: Gender): void {
//   console.log("|枚举", data);
// }

// changeGender("man");
// changeGender("woman");

type Area = {
  width: number;
  height: number;
};

type Address = {
  num: number;
  cell: number;
  room: string;
};

type House = Area & Address; //type 交叉类型用法

const house: House = {
  width: 100,
  height: 200,
  num: 1,
  cell: 2,
  room: "bedroom",
};
